package java_jc_cs;

import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.nio.file.Path;

public class _100{
    Path file=Path.of("File\\file.txt");
    Path file_gbk=Path.of("File\\file-gbk.txt");
    void transcoding () throws IOException {
        String s=Files.readString(file);
        Files.writeString(file_gbk,s, Charset.forName("GBK"));
    }
}